package com.wy.two.Prototype;

/**
 * @author 33117
 * @version 1.0
 * @data 2025/3/10 16:25
 * 创建一个实现 Cloneable 接口的原型类
 */
public class Shape implements Cloneable{
    private String type;

    public Shape(String type) {
        this.type = type;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }
    @Override
    public Shape clone() {
        try {
            return (Shape) super.clone();
        } catch (CloneNotSupportedException e) {
            return null;
        }
    }
}
